<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>

<body>
    <!-- <div id="app">
        <h2 @click='change'>{{msg}}</h2>

        <h2 v-once @click='change'>{{msg}}</h2>
    </div>

    <script>
        let vm = new Vue({
            el: '#app',
            data: {
                msg: '我只绑定一次'
            },
            methods: {
                change() {
                    alert(1);
                    this.msg = "你想改造我马?";
                }
            }
        })
    </script> -->
































    <div id="app">
        <h2 @click='change'>{{msg}}</h2>

        <h2 v-once @click='change'>{{msg}}</h2>
    </div>

    <script>
        let vm = new Vue({
            el: '#app',
            data: {
                msg: '我只绑定一次'
            },
            methods: {
                change() {
                    alert(1);
                    this.msg = '你想改造我马?';
                }
            }
        })
    </script>
</body>

</html>